from django.core.exceptions import ObjectDoesNotExist
from models import ExtraSetup

def layout(request):
    try:
        hms_header = ExtraSetup.objects.get(code="SITE-NAME")
    except ObjectDoesNotExist:
        hms_header = 'HMS site'
    
    # to be performed with INTERNATIONALIZATION
    lo_categories = 'Categorias'
    lo_clubs = 'Clubes'
    lo_players = 'Jugadores'
    lo_referees = 'Arbitros'
    lo_events = 'Proximos eventos'
    
    return {'hms_header':hms_header,'lo_categories':lo_categories,\
            'lo_clubs':lo_clubs,'lo_players':lo_players,'lo_referees':lo_referees,\
            'lo_events':lo_events}
    